package com.da.lon.wang.xlg.view;


import android.annotation.SuppressLint;
import android.app.Dialog;
import android.content.Context;
import android.graphics.drawable.AnimationDrawable;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup.LayoutParams;
import android.view.Window;
import android.view.WindowManager;
import android.webkit.WebView;
import android.widget.ImageView;

import com.ant.liao.GifView;
import com.da.lon.wang.xlg.R;

public class LoadingDialog extends Dialog {
    private Context context;
    private WebView runWebView;
    private ImageView mImageView;
    private AnimationDrawable mAnimation;
    private GifView dialogGifView;

    @SuppressLint("InflateParams")
    public LoadingDialog(Context context) {
        super(context, R.style.ocoffee_loading_dialog);
        this.context = context;
        requestWindowFeature(Window.FEATURE_NO_TITLE);
        setCancelable(false);
        setCanceledOnTouchOutside(true);

        LayoutParams params = new LayoutParams(LayoutParams.MATCH_PARENT, LayoutParams.MATCH_PARENT);
        View view = LayoutInflater.from(context).inflate(R.layout.londing_view, null);
        setContentView(view, params);

        Window win = getWindow();
        WindowManager.LayoutParams layoutParams = win.getAttributes();
        layoutParams.width = LayoutParams.MATCH_PARENT;
        layoutParams.height = LayoutParams.MATCH_PARENT;
        win.setAttributes(layoutParams);
    }


}
